#ifndef ____________WARD_TRANSITMGR_H
#define ____________WARD_TRANSITMGR_H


#include <list>

#include "transitInfo.h"
#include "force.h"


class transitMgr
{

public:

	transitMgr() { current = data.end(); ncptr = data.begin();}


	//adds a transit to the list
	void add(int src, int dest, int turns, Force f);

	//returns true if there are more finished transits
	bool moreDone();


	void print();

	void turn();

	void turn(int i);
	//returns true if there are more finished transits, AND loads the next one into the "current" pointer which
	//can be used with the accessors below.
	//returns false if there are no more finished transits
	bool nextDone();


	//returns true if there are more "close" transits (1 off) , AND loads the next one into the "current" pointer which
	//can be used with the accessors below.
	//returns false if there are no more "close" transits
	list<transitInfo>& transitMgr::getList();
	void setList(list<transitInfo> ti) { data = ti; }
	int getSrc() {  return current->getSrc(); }
	int getDest() {  return current->getDest();  }
	Force getForce() {  return current->getForce(); }




private:

	list<transitInfo> data;
	std::list<transitInfo>::iterator current;
	std::list<transitInfo>::iterator ncptr;

};


#endif